Intention: Want to become familiar with the DataFrames in Julia.
http://juliastats.github.io/DataFrames.jl/introduction.html

Basics:


In [2]:
#Pkg.add("DataFrames")
using DataFrames

DataFrames gives a "NA" value representing missing values.


In [23]:
println(DataFrames.NA)
println(typeof(NA))


NA
NAtype

In [9]:
false && NA


Out[9]:
false

In [10]:
true && NA


Out[10]:
NA

In [11]:
true || NA


Out[11]:
true

In [12]:
1 + NA


Out[12]:
NA

In [13]:
NA*2


Out[13]:
NA

In [15]:
NA^2


Out[15]:
NA

In [16]:
NA/0


Out[16]:
NA
WARNING: contains(collection, item) is deprecated, use in(item, collection) instead
 in contains at reduce.jl:238

Next up: There's an Array type as julia's array doesn't handle NAs.
Also, there are DataVector and DataMatrix


In [25]:
dv = DataArray([1, 3, 2, 5, 4])
dv[1] = NA

dv


Out[25]:
5-element DataArray{Int64,1}:
  NA
 3  
 2  
 5  
 4  

In [26]:
mean(dv)


Out[26]:
NA

In [27]:
mean(removeNA(dv))


Out[27]:
3.5

In [28]:
mean(failNA(dv))


no method NAException()
at In[28]:1
 in failNA at /home/msouza/.julia/DataFrames/src/dataarray.jl:178

In [29]:
mean(replaceNA(dv, 123))


Out[29]:
27.4

In [30]:
dm = DataArray([1.0 0.0; 0.0 1.0])


Out[30]:
2x2 DataArray{Float64,2}:
 1.0  0.0
 0.0  1.0

In [31]:
dm[1,1] = NA


Out[31]:
NA

In [32]:
dm*dm


Out[32]:
2x2 DataArray{Float64,2}:
 NA   NA
 NA  1.0

In [33]:
removeNA(dm)


Out[33]:
3-element Array{Float64,1}:
 0.0
 0.0
 1.0

DataFrame - Tabular data


In [34]:
df = DataFrame()
df["A"] = 1:4
df


Out[34]:
4x1 DataFrame:
        A
[1,]    1
[2,]    2
[3,]    3
[4,]    4

In [35]:
df["B"] = ["B1", "B2", "B3", "B4"]
df


Out[35]:
4x2 DataFrame:
        A    B
[1,]    1 "B1"
[2,]    2 "B2"
[3,]    3 "B3"
[4,]    4 "B4"

In [36]:
df = DataFrame(A = 1:4, B = ["M", "F", "F", "M"])
df


Out[36]:
4x2 DataFrame:
        A   B
[1,]    1 "M"
[2,]    2 "F"
[3,]    3 "F"
[4,]    4 "M"

In [37]:
size(df)


Out[37]:
(4,2)

In [42]:
df[1:3, :]


Out[42]:
3x2 DataFrame:
        A   B
[1,]    1 "M"
[2,]    2 "F"
[3,]    3 "F"

In [44]:
describe(df)


A
Min      1.0
1st Qu.  1.75
Median   2.5
Mean     2.5
3rd Qu.  3.25
Max      4.0
NAs      0
NA%      0.0%

B
Length  4
Type    ASCIIString
NAs     0
NA%     0.0%
Unique  2


In [47]:
using RDatasets
iris = RDatasets.data("datasets", "iris")
head(iris)


Out[47]:
6x6 DataFrame:
          Sepal.Length Sepal.Width Petal.Length Petal.Width  Species
[1,]    1          5.1         3.5          1.4         0.2 "setosa"
[2,]    2          4.9         3.0          1.4         0.2 "setosa"
[3,]    3          4.7         3.2          1.3         0.2 "setosa"
[4,]    4          4.6         3.1          1.5         0.2 "setosa"
[5,]    5          5.0         3.6          1.4         0.2 "setosa"
[6,]    6          5.4         3.9          1.7         0.4 "setosa"

In [48]:
describe(iris)


Min      1.0
1st Qu.  38.25
Median   75.5
Mean     75.5
3rd Qu.  112.75
Max      150.0
NAs      0
NA%      0.0%

Sepal.Length
Min      4.3
1st Qu.  5.1
Median   5.8
Mean     5.843333333333332
3rd Qu.  6.4
Max      7.9
NAs      0
NA%      0.0%

Sepal.Width
Min      2.0
1st Qu.  2.8
Median   3.0
Mean     3.0573333333333337
3rd Qu.  3.3
Max      4.4
NAs      0
NA%      0.0%

Petal.Length
Min      1.0
1st Qu.  1.6
Median   4.35
Mean     3.758000000000001
3rd Qu.  5.1
Max      6.9
NAs      0
NA%      0.0%

Petal.Width
Min      0.1
1st Qu.  0.3
Median   1.3
Mean     1.1993333333333331
3rd Qu.  1.8
Max      2.5
NAs      0
NA%      0.0%

Species
Length  150
Type    UTF8String
NAs     0
NA%     0.0%
Unique  3

I/O

Let's get some data to play with.


In [52]:
run(`wget http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/Medicare-Provider-Charge-Data/Downloads/OPPS_APC_CSV.zip`)


--2013-09-15 20:21:56--  http://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/Medicare-Provider-Charge-Data/Downloads/OPPS_APC_CSV.zip
Resolving www.cms.gov (www.cms.gov)... 2607:f028:0:400:146:123:140:205, 146.123.140.205
Connecting to www.cms.gov (www.cms.gov)|2607:f028:0:400:146:123:140:205|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1967430 (1.9M) [application/x-zip-compressed]
Saving to: `OPPS_APC_CSV.zip'

     0K .......... .......... .......... .......... ..........  2%  128K 15s
    50K .......... .......... .......... .......... ..........  5%  436K 9s
   100K .......... .......... .......... .......... ..........  7%  280K 8s
   150K .......... .......... .......... .......... .......... 10%  319K 7s
   200K .......... .......... .......... .......... .......... 13%  359K 7s
   250K .......... .......... .......... .......... .......... 15%  301K 6s
   300K .......... .......... .......... .......... .......... 18%  388K 6s
   350K .......... .......... .......... .......... .......... 20%  296K 5s
   400K .......... .......... .......... .......... .......... 23%  290K 5s
   450K .......... .......... .......... .......... .......... 26%  409K 5s
   500K .......... .......... .......... .......... .......... 28%  287K 5s
   550K .......... .......... .......... .......... .......... 31%  294K 5s
   600K .......... .......... .......... .......... .......... 33%  335K 4s
   650K .......... .......... .......... .......... .......... 36%  280K 4s
   700K .......... .......... .......... .......... .......... 39%  429K 4s
   750K .......... .......... .......... .......... .......... 41%  278K 4s
   800K .......... .......... .......... .......... .......... 44%  330K 4s
   850K .......... .......... .......... .......... .......... 46%  355K 3s
   900K .......... .......... .......... .......... .......... 49%  283K 3s
   950K .......... .......... .......... .......... .......... 52%  345K 3s
  1000K .......... .......... .......... .......... .......... 54%  348K 3s
  1050K .......... .......... .......... .......... .......... 57%  295K 3s
  1100K .......... .......... .......... .......... .......... 59%  407K 3s
  1150K .......... .......... .......... .......... .......... 62%  282K 2s
  1200K .......... .......... .......... .......... .......... 65%  327K 2s
  1250K .......... .......... .......... .......... .......... 67%  349K 2s
  1300K .......... .......... .......... .......... .......... 70%  302K 2s
  1350K .......... .......... .......... .......... .......... 72%  299K 2s
  1400K .......... .......... .......... .......... .......... 75%  380K 2s
  1450K .......... .......... .......... .......... .......... 78%  314K 1s
  1500K .......... .......... .......... .......... .......... 80%  305K 1s
  1550K .......... .......... .......... .......... .......... 83%  369K 1s
  1600K .......... .......... .......... .......... .......... 85%  310K 1s
  1650K .......... .......... .......... .......... .......... 88%  366K 1s
  1700K .......... .......... .......... .......... .......... 91%  310K 1s
  1750K .......... .......... .......... .......... .......... 93%  309K 0s
  1800K .......... .......... .......... .......... .......... 96%  345K 0s
  1850K .......... .......... .......... .......... .......... 98%  327K 0s
  1900K .......... .......... .                               100%  311K=6.1s

2013-09-15 20:22:03 (313 KB/s) - `OPPS_APC_CSV.zip' saved [1967430/1967430]


In [53]:
run(`unzip OPPS_APC_CSV`)


Archive:  OPPS_APC_CSV.zip
  inflating: Medicare_Provider_Charge_Outpatient_APC30_CY2011_v2.csv  

In [62]:
in_f = "Medicare_Provider_Charge_Outpatient_APC30_CY2011_v2.csv"


Out[62]:
"Medicare_Provider_Charge_Outpatient_APC30_CY2011_v2.csv"

In [65]:
medicare_df = DataFrames.readtable(in_f)
head(medicare_df)


Out[65]:
6x11 DataFrame:
                                               APC Provider Id                                       Provider Name                  Provider Street Address Provider City Provider State Provider Zip Code Hospital Referral Region (HRR) Description Outpatient Services Average  Estimated Submitted Charges Average Total Payments
[1,]    "0012 - Level I Debridement & Destruction"       10029               "EAST ALABAMA MEDICAL CENTER AND SNF"                 "2000 PEPPERELL PARKWAY"     "OPELIKA"           "AL"             36801                          "AL - Birmingham"                  23                               78.087                21.9104
[2,]    "0012 - Level I Debridement & Destruction"       20024                "CENTRAL PENINSULA GENERAL HOSPITAL"                     "250 HOSPITAL PLACE"    "SOLDOTNA"           "AK"             99669                           "AK - Anchorage"                 994                               149.59                36.6239
[3,]    "0012 - Level I Debridement & Destruction"       30064  "UNIVERSITY OF ARIZONA MEDICAL CTR-UNIVERSIT, THE"             "1501 NORTH CAMPBELL AVENUE"      "TUCSON"           "AZ"             85724                              "AZ - Tucson"                1765                              50.1354                14.5418
[4,]    "0012 - Level I Debridement & Destruction"       30088                     "BANNER BAYWOOD MEDICAL CENTER"               "6644 EAST BAYWOOD AVENUE"        "MESA"           "AZ"             85206                                "AZ - Mesa"                  20                                112.4                 23.736
[5,]    "0012 - Level I Debridement & Destruction"       30111 "UNIVERSITY OF ARIZONA MEDICAL CTR- SOUTH CAM, THE"                      "2800 EAST AJO WAY"      "TUCSON"           "AZ"             85713                              "AZ - Tucson"                  22                              152.045                16.5691
[6,]    "0012 - Level I Debridement & Destruction"       40016                               "UAMS MEDICAL CENTER" "4301 WEST MARKHAM STREET MAIL SLOT 612" "LITTLE ROCK"           "AR"             72205                         "AR - Little Rock"                3166                              58.9547                13.5738

In [66]:
describe(medicare_df)


APC
Length  43372
Type    UTF8String
NAs     0
NA%     0.0%
Unique  30

Provider Id
Min      10001.0
1st Qu.  140043.0
Median   260091.0
Mean     265410.9217467491
3rd Qu.  390101.0
Max      670061.0
NAs      0
NA%      0.0%

Provider Name
Length  43372
Type    UTF8String
NAs     0
NA%     0.0%
Unique  3007

Provider Street Address
Length  43372
Type    UTF8String
NAs     0
NA%     0.0%
Unique  3124

Provider City
Length  43372
Type    UTF8String
NAs     0
NA%     0.0%
Unique  1899

Provider State
Length  43372
Type    UTF8String
NAs     0
NA%     0.0%
Unique  50

Provider Zip Code
Min      1040.0
1st Qu.  28645.0
Median   46342.0
Mean     49041.02243382828
3rd Qu.  73101.0
Max      99801.0
NAs      0
NA%      0.0%

Hospital Referral Region (HRR) Description
Length  43372
Type    UTF8String
NAs     0
NA%     0.0%
Unique  304

Outpatient Services
Min      11.0
1st Qu.  42.0
Median   128.0
Mean     587.9809554551323
3rd Qu.  347.0
Max      219042.0
NAs      0
NA%      0.0%

Average  Estimated Submitted Charges
Min      12.64375
1st Qu.  284.6104982
Median   709.9951883
Mean     1473.9940471990976
3rd Qu.  2102.12134575
Max      32105.63636
NAs      0
NA%      0.0%

Average Total Payments
Min      7.305
1st Qu.  74.62771393
Median   139.29856984999998
Mean     265.4255857645218
3rd Qu.  394.21131637499997
Max      2062.470526
NAs      0
NA%      0.0%


In [69]:
medicare_partial_df = DataFrames.readtable(in_f, nrows=1)
head(medicare_partial_df)


Out[69]:
1x11 DataFrame:
                                               APC Provider Id                         Provider Name  Provider Street Address Provider City Provider State Provider Zip Code Hospital Referral Region (HRR) Description Outpatient Services Average  Estimated Submitted Charges Average Total Payments
[1,]    "0012 - Level I Debridement & Destruction"       10029 "EAST ALABAMA MEDICAL CENTER AND SNF" "2000 PEPPERELL PARKWAY"     "OPELIKA"           "AL"             36801                          "AL - Birmingham"                  23                               78.087                21.9104

Accessing and Modifying DFs:


In [70]:
df = DataFrame(A = 1:10, B = 2:2:20)


Out[70]:
10x2 DataFrame:
          A  B
[1,]      1  2
[2,]      2  4
[3,]      3  6
[4,]      4  8
[5,]      5 10
[6,]      6 12
[7,]      7 14
[8,]      8 16
[9,]      9 18
[10,]    10 20

In [71]:
df[1:3, ["A", "B"]]


Out[71]:
3x2 DataFrame:
        A B
[1,]    1 2
[2,]    2 4
[3,]    3 6

In [72]:
df[1:3, ["B"]]


Out[72]:
3x1 DataFrame:
        B
[1,]    2
[2,]    4
[3,]    6

In [73]:
df[3:, ["B"]]


Out[73]:
8x1 DataFrame:
         B
[1,]     6
[2,]     8
[3,]    10
[4,]    12
[5,]    14
[6,]    16
[7,]    18
[8,]    20

Can use quoted expressions to evaluate which columns we want!


In [93]:
#df[:(A % 2 .== 0 && B % 4 .== 0), :] # Doesn't work?
select(:((A % 2 .== 0) & (B % 3 .== 0)), df)


Out[93]:
1x2 SubDataFrame:
        A  B
[1,]    6 12

Joins and Indexing:


In [95]:
names = DataFrame(ID = [1, 2], Name = ["John Doe", "Jane Doe"])


Out[95]:
2x2 DataFrame:
        ID       Name
[1,]     1 "John Doe"
[2,]     2 "Jane Doe"

In [96]:
jobs = DataFrame(ID = [1, 2], Job = ["Lawyer", "Doctor"])


Out[96]:
2x2 DataFrame:
        ID      Job
[1,]     1 "Lawyer"
[2,]     2 "Doctor"

In [97]:
full = join(names, jobs, on = "ID")


Out[97]:
2x3 DataFrame:
        ID       Name      Job
[1,]     1 "John Doe" "Lawyer"
[2,]     2 "Jane Doe" "Doctor"

In [98]:
full = join(names, jobs)


Out[98]:
2x3 DataFrame:
        ID       Name      Job
[1,]     1 "John Doe" "Lawyer"
[2,]     2 "Jane Doe" "Doctor"

Indexing:


In [100]:
# Apparently not complete yet.

Split, Apply, Combine

There's a function called "by(dataframe, column to split on, function to apply)".
This allows one to split data into groups, apply a function to each, then combine the results.


In [102]:
iris = data("datasets", "iris")

by(iris, "Species", nrow)
by(iris, "Species", df -> mean(df["Petal.Length"]))
by(iris, "Species", :(N = size(_DF, 1)))


Out[102]:
3x2 DataFrame:
             Species  N
[1,]        "setosa" 50
[2,]    "versicolor" 50
[3,]     "virginica" 50

In [103]:
for subdf in groupby(iris, "Species")
	println(size(subdf, 1))
end


50
50
50

Reshaping/Pivoting


In [105]:
stack(iris, "Sepal.Length")


Out[105]:
150x7 DataFrame:
                variable value     Sepal.Width Petal.Length Petal.Width     Species
[1,]      "Sepal.Length"   5.1   1         3.5          1.4         0.2    "setosa"
[2,]      "Sepal.Length"   4.9   2         3.0          1.4         0.2    "setosa"
[3,]      "Sepal.Length"   4.7   3         3.2          1.3         0.2    "setosa"
[4,]      "Sepal.Length"   4.6   4         3.1          1.5         0.2    "setosa"
[5,]      "Sepal.Length"   5.0   5         3.6          1.4         0.2    "setosa"
[6,]      "Sepal.Length"   5.4   6         3.9          1.7         0.4    "setosa"
[7,]      "Sepal.Length"   4.6   7         3.4          1.4         0.3    "setosa"
[8,]      "Sepal.Length"   5.0   8         3.4          1.5         0.2    "setosa"
[9,]      "Sepal.Length"   4.4   9         2.9          1.4         0.2    "setosa"
[10,]     "Sepal.Length"   4.9  10         3.1          1.5         0.1    "setosa"
[11,]     "Sepal.Length"   5.4  11         3.7          1.5         0.2    "setosa"
[12,]     "Sepal.Length"   4.8  12         3.4          1.6         0.2    "setosa"
[13,]     "Sepal.Length"   4.8  13         3.0          1.4         0.1    "setosa"
[14,]     "Sepal.Length"   4.3  14         3.0          1.1         0.1    "setosa"
[15,]     "Sepal.Length"   5.8  15         4.0          1.2         0.2    "setosa"
[16,]     "Sepal.Length"   5.7  16         4.4          1.5         0.4    "setosa"
[17,]     "Sepal.Length"   5.4  17         3.9          1.3         0.4    "setosa"
[18,]     "Sepal.Length"   5.1  18         3.5          1.4         0.3    "setosa"
[19,]     "Sepal.Length"   5.7  19         3.8          1.7         0.3    "setosa"
[20,]     "Sepal.Length"   5.1  20         3.8          1.5         0.3    "setosa"
  :
[131,]    "Sepal.Length"   7.4 131         2.8          6.1         1.9 "virginica"
[132,]    "Sepal.Length"   7.9 132         3.8          6.4         2.0 "virginica"
[133,]    "Sepal.Length"   6.4 133         2.8          5.6         2.2 "virginica"
[134,]    "Sepal.Length"   6.3 134         2.8          5.1         1.5 "virginica"
[135,]    "Sepal.Length"   6.1 135         2.6          5.6         1.4 "virginica"
[136,]    "Sepal.Length"   7.7 136         3.0          6.1         2.3 "virginica"
[137,]    "Sepal.Length"   6.3 137         3.4          5.6         2.4 "virginica"
[138,]    "Sepal.Length"   6.4 138         3.1          5.5         1.8 "virginica"
[139,]    "Sepal.Length"   6.0 139         3.0          4.8         1.8 "virginica"
[140,]    "Sepal.Length"   6.9 140         3.1          5.4         2.1 "virginica"
[141,]    "Sepal.Length"   6.7 141         3.1          5.6         2.4 "virginica"
[142,]    "Sepal.Length"   6.9 142         3.1          5.1         2.3 "virginica"
[143,]    "Sepal.Length"   5.8 143         2.7          5.1         1.9 "virginica"
[144,]    "Sepal.Length"   6.8 144         3.2          5.9         2.3 "virginica"
[145,]    "Sepal.Length"   6.7 145         3.3          5.7         2.5 "virginica"
[146,]    "Sepal.Length"   6.7 146         3.0          5.2         2.3 "virginica"
[147,]    "Sepal.Length"   6.3 147         2.5          5.0         1.9 "virginica"
[148,]    "Sepal.Length"   6.5 148         3.0          5.2         2.0 "virginica"
[149,]    "Sepal.Length"   6.2 149         3.4          5.4         2.3 "virginica"
[150,]    "Sepal.Length"   5.9 150         3.0          5.1         1.8 "virginica"

Streaming Data


In [110]:
iris = DataStream(data("datasets", "iris"))
for minibatch in iris
	printtable(minibatch)
end


"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
1,5.1,3.5,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
2,4.9,3.0,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
3,4.7,3.2,1.3,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
4,4.6,3.1,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
5,5.0,3.6,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
6,5.4,3.9,1.7,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
7,4.6,3.4,1.4,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
8,5.0,3.4,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
9,4.4,2.9,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
10,4.9,3.1,1.5,0.1,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
11,5.4,3.7,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
12,4.8,3.4,1.6,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
13,4.8,3.0,1.4,0.1,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
14,4.3,3.0,1.1,0.1,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
15,5.8,4.0,1.2,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
16,5.7,4.4,1.5,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
17,5.4,3.9,1.3,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
18,5.1,3.5,1.4,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
19,5.7,3.8,1.7,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
20,5.1,3.8,1.5,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
21,5.4,3.4,1.7,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
22,5.1,3.7,1.5,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
23,4.6,3.6,1.0,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
24,5.1,3.3,1.7,0.5,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
25,4.8,3.4,1.9,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
26,5.0,3.0,1.6,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
27,5.0,3.4,1.6,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
28,5.2,3.5,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
29,5.2,3.4,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
30,4.7,3.2,1.6,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
31,4.8,3.1,1.6,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
32,5.4,3.4,1.5,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
33,5.2,4.1,1.5,0.1,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
34,5.5,4.2,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
35,4.9,3.1,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
36,5.0,3.2,1.2,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
37,5.5,3.5,1.3,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
38,4.9,3.6,1.4,0.1,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
39,4.4,3.0,1.3,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
40,5.1,3.4,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
41,5.0,3.5,1.3,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
42,4.5,2.3,1.3,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
43,4.4,3.2,1.3,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
44,5.0,3.5,1.6,0.6,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
45,5.1,3.8,1.9,0.4,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
46,4.8,3.0,1.4,0.3,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
47,5.1,3.8,1.6,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
48,4.6,3.2,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
49,5.3,3.7,1.5,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
50,5.0,3.3,1.4,0.2,"setosa"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
51,7.0,3.2,4.7,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
52,6.4,3.2,4.5,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
53,6.9,3.1,4.9,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
54,5.5,2.3,4.0,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
55,6.5,2.8,4.6,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
56,5.7,2.8,4.5,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
57,6.3,3.3,4.7,1.6,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
58,4.9,2.4,3.3,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
59,6.6,2.9,4.6,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
60,5.2,2.7,3.9,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
61,5.0,2.0,3.5,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
62,5.9,3.0,4.2,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
63,6.0,2.2,4.0,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
64,6.1,2.9,4.7,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
65,5.6,2.9,3.6,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
66,6.7,3.1,4.4,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
67,5.6,3.0,4.5,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
68,5.8,2.7,4.1,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
69,6.2,2.2,4.5,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
70,5.6,2.5,3.9,1.1,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
71,5.9,3.2,4.8,1.8,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
72,6.1,2.8,4.0,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
73,6.3,2.5,4.9,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
74,6.1,2.8,4.7,1.2,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
75,6.4,2.9,4.3,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
76,6.6,3.0,4.4,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
77,6.8,2.8,4.8,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
78,6.7,3.0,5.0,1.7,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
79,6.0,2.9,4.5,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
80,5.7,2.6,3.5,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
81,5.5,2.4,3.8,1.1,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
82,5.5,2.4,3.7,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
83,5.8,2.7,3.9,1.2,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
84,6.0,2.7,5.1,1.6,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
85,5.4,3.0,4.5,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
86,6.0,3.4,4.5,1.6,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
87,6.7,3.1,4.7,1.5,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
88,6.3,2.3,4.4,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
89,5.6,3.0,4.1,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
90,5.5,2.5,4.0,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
91,5.5,2.6,4.4,1.2,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
92,6.1,3.0,4.6,1.4,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
93,5.8,2.6,4.0,1.2,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
94,5.0,2.3,3.3,1.0,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
95,5.6,2.7,4.2,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
96,5.7,3.0,4.2,1.2,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
97,5.7,2.9,4.2,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
98,6.2,2.9,4.3,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
99,5.1,2.5,3.0,1.1,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
100,5.7,2.8,4.1,1.3,"versicolor"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
101,6.3,3.3,6.0,2.5,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
102,5.8,2.7,5.1,1.9,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
103,7.1,3.0,5.9,2.1,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
104,6.3,2.9,5.6,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
105,6.5,3.0,5.8,2.2,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
106,7.6,3.0,6.6,2.1,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
107,4.9,2.5,4.5,1.7,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
108,7.3,2.9,6.3,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
109,6.7,2.5,5.8,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
110,7.2,3.6,6.1,2.5,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
111,6.5,3.2,5.1,2.0,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
112,6.4,2.7,5.3,1.9,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
113,6.8,3.0,5.5,2.1,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
114,5.7,2.5,5.0,2.0,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
115,5.8,2.8,5.1,2.4,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
116,6.4,3.2,5.3,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
117,6.5,3.0,5.5,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
118,7.7,3.8,6.7,2.2,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
119,7.7,2.6,6.9,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
120,6.0,2.2,5.0,1.5,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
121,6.9,3.2,5.7,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
122,5.6,2.8,4.9,2.0,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
123,7.7,2.8,6.7,2.0,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
124,6.3,2.7,4.9,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
125,6.7,3.3,5.7,2.1,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
126,7.2,3.2,6.0,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
127,6.2,2.8,4.8,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
128,6.1,3.0,4.9,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
129,6.4,2.8,5.6,2.1,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
130,7.2,3.0,5.8,1.6,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
131,7.4,2.8,6.1,1.9,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
132,7.9,3.8,6.4,2.0,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
133,6.4,2.8,5.6,2.2,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
134,6.3,2.8,5.1,1.5,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
135,6.1,2.6,5.6,1.4,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
136,7.7,3.0,6.1,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
137,6.3,3.4,5.6,2.4,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
138,6.4,3.1,5.5,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
139,6.0,3.0,4.8,1.8,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
140,6.9,3.1,5.4,2.1,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
141,6.7,3.1,5.6,2.4,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
142,6.9,3.1,5.1,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
143,5.8,2.7,5.1,1.9,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
144,6.8,3.2,5.9,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
145,6.7,3.3,5.7,2.5,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
146,6.7,3.0,5.2,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
147,6.3,2.5,5.0,1.9,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
148,6.5,3.0,5.2,2.0,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
149,6.2,3.4,5.4,2.3,"virginica"
"","Sepal.Length","Sepal.Width","Petal.Length","Petal.Width","Species"
150,5.9,3.0,5.1,1.8,"virginica"

Formula, ModelFrame, ModelMatrix


In [ ]: